Skip to content

[LIVY-1080] Add missing properties that allows to configure kinit thread - #431

Merged
gyogal merged 1 commit into
apache:masterfrom
idzikovsky:add-missing-krb-props
Sep 16, 2026
Merged

gyogal merged 1 commit into
apache:masterfrom
idzikovsky:add-missing-krb-props

Conversation

@idzikovsky

@idzikovsky idzikovsky commented Nov 10, 2023

Copy link
Copy Markdown
Contributor

JIRA: LIVY-1080

What changes were proposed in this pull request?

This properties allow to configure kinit thread and not documented anywhere except for the code:
https://github.com/apache/incubator-livy/blob/86fc823/server/src/main/scala/org/apache/livy/LivyConf.scala#L106-L109
https://github.com/apache/incubator-livy/blob/86fc823/server/src/main/scala/org/apache/livy/server/LivyServer.scala#L106-L141

How was this patch tested?

Manual

Was this patch authored or co-authored using generative AI tooling?

No

@idzikovsky idzikovsky changed the title Add missing properties that allows to configure kinit thread [MINOR} Add missing properties that allows to configure kinit thread Nov 16, 2023
@idzikovsky idzikovsky changed the title [MINOR} Add missing properties that allows to configure kinit thread [MINOR] Add missing properties that allows to configure kinit thread Nov 16, 2023
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has had no activity for at least 3 months. If you are still working on this change or plan to move it forward, please leave a comment or push a new commit so we know to keep it open. Otherwise, this PR will be closed automatically in about one month. Thank you for your contribution to Apache Livy!

@github-actions github-actions Bot added the stale label Feb 22, 2026
@idzikovsky

Copy link
Copy Markdown
Contributor Author

This is still relevant by the way.

@github-actions github-actions Bot removed the stale label Feb 25, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has had no activity for at least 3 months. If you are still working on this change or plan to move it forward, please leave a comment or push a new commit so we know to keep it open. Otherwise, this PR will be closed automatically in about one month. Thank you for your contribution to Apache Livy!

@github-actions github-actions Bot added the stale label May 26, 2026
@idzikovsky

Copy link
Copy Markdown
Contributor Author

This is still relevant. Can I do something to help to proceed with this PR?

@github-actions github-actions Bot removed the stale label May 28, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has had no activity for at least 3 months. If you are still working on this change or plan to move it forward, please leave a comment or push a new commit so we know to keep it open. Otherwise, this PR will be closed automatically in about one month. Thank you for your contribution to Apache Livy!

@github-actions github-actions Bot added the stale label Aug 27, 2026
@idzikovsky

Copy link
Copy Markdown
Contributor Author

This is still relevant

@github-actions github-actions Bot removed the stale label Aug 30, 2026
@gyogal

gyogal commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Hi @idzikovsky , thanks for submitting the PR. It got lost among all the stale PRs, but now that many of those are closed, I saw this was still open. Could you please add the "## Was this patch authored or co-authored using generative AI tooling?" section in the PR description and could you please also create a JIRA for it? If those are done, this PR could be merged.

@idzikovsky idzikovsky changed the title [MINOR] Add missing properties that allows to configure kinit thread [LIVY-1080] Add missing properties that allows to configure kinit thread Sep 16, 2026
@idzikovsky

Copy link
Copy Markdown
Contributor Author

@gyogal

Sure. Done. Thank you!

@gyogal

gyogal commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Thanks for the updates @idzikovsky , the PR looks good now! Also, there have been a few other Kerberos related PRs opened and merged recently by different contributors, if you have some time, please check them out to see if those are working for your use case. Many thanks!

@gyogal
gyogal merged commit 35fa3dc into apache:master Sep 16, 2026
@idzikovsky

Copy link
Copy Markdown
Contributor Author

There were already following properties added into livy.conf:

# Authentication support for Livy server
# Livy has a built-in SPnego authentication support for HTTP requests  with below configurations.
# livy.server.auth.type = kerberos
# livy.server.auth.kerberos.principal = <spnego principal>
# livy.server.auth.kerberos.keytab = <spnego keytab>
# livy.server.auth.kerberos.name-rules = DEFAULT

Those are properties which configures the HTTP/host@REALM principal used for Livy HTTP server (for inbound SPNEGO authentication).

The properties in this PR configures the Kerberos credentials for the Livy Server itself so it will be able to communicate with KDC and start kinit thread:

val launch_keytab = livyConf.get(LAUNCH_KERBEROS_KEYTAB)
val launch_principal = SecurityUtil.getServerPrincipal(
livyConf.get(LAUNCH_KERBEROS_PRINCIPAL), host)
require(launch_keytab != null,
s"Kerberos requires ${LAUNCH_KERBEROS_KEYTAB.key} to be provided.")
require(launch_principal != null,
s"Kerberos requires ${LAUNCH_KERBEROS_PRINCIPAL.key} to be provided.")
if (!runKinit(launch_keytab, launch_principal)) {
error("Failed to run kinit, stopping the server.")
sys.exit(1)
}

Anyway, thank you!

@idzikovsky
idzikovsky deleted the add-missing-krb-props branch September 16, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants